﻿/* ************************************************************
 * Namespace: JumpFleetGameLib.xMap.SectorMap
 * Class:  BlankBackgroundTile
 * Author:  Roy Penrod
 * 
 * Represents an empty background tile in the sector map.  
 * 
 * It's just a placeholder and doesn't draw anything.  
 * It allows the background color to show through.
 *  
 * ************************************************************ */

using System;
using Microsoft.Xna.Framework;

namespace JumpFleetGameLib.xMap.SectorMap
{
    public class BlankBackgroundTile : BackgroundTile
    {
        #region MEMBERS
        #endregion


        #region PROPERTIES
        
        /// <summary>
        /// Visible is always false for a blank background tile.  Always returns false.
        /// </summary>
        public override bool Visible
        {
            get { return base.Visible; }

            set
            {
                // left blank intentionally
                // set doesn't do anything
            }
        }

        #endregion


        #region CONSTRUCTORS

        /// <summary>
        /// Constructor for the BlankBackgroundTile class.  Visible is always false for a blank background tile.  The Layer defaults to 1.0f.
        /// </summary>
        /// <param name="tileWidth">The width of the blank background tile.  Type: int</param>
        /// <param name="tileHeight">The height of the blank background tile.  Type: int</param>
        public BlankBackgroundTile(int tileWidth, int tileHeight) :
            base ("blank", tileWidth, tileHeight, 1.0f)
        {
            // all the work is done in the base constructor
        }

        /// <summary>
        /// Constructor for the BlankBackgroundTile class.  Visible is always false for a blank background tile.
        /// </summary>
        /// <param name="tileWidth">The width of the blank background tile.  Type: int</param>
        /// <param name="tileHeight">The height of the blank background tile.  Type: int</param>
        /// <param name="layerDepth">Layer depth of the blank background tile.  Type: float</param>
        public BlankBackgroundTile(int tileWidth, int tileHeight, float layerDepth) :
            base("blank", tileWidth, tileHeight, layerDepth)
        {
            // all the work is done in the base constructor
        }

        #endregion


        #region METHODS

        // creates a copy of the BlankBackgroundTile object        
        public BlankBackgroundTile Clone()
        {
            // creates a new BlankBackgroundTile object with the same Width, Height, and Layer properties
            BlankBackgroundTile newBlankBackgroundTile = new BlankBackgroundTile(this.Width, this.Height, this.Layer);

            // copies the Position property
            newBlankBackgroundTile.Position = this.Position;            

            // returns the copy
            return newBlankBackgroundTile;
        }

        #endregion

    } // <-- end class
} // <-- end namespace
